package com.wangzhixuan.model.vo;

import java.io.Serializable;

import com.wangzhixuan.commons.constant.ApiCode;
import com.wangzhixuan.commons.scan.MyException;
import com.wangzhixuan.commons.utils.StringUtils;

public class ReasonVo implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 81871376176614047L;
	private Integer userId;
	private Integer workId;
	private Integer ponId;
	private String ronIdArr;
	private String[] ronIdArrlist;
	
	public String[] getRonIdArrlist() {
		ronIdArrlist = ronIdArr.split(",");
		return ronIdArrlist;
	}

	public void checekParam() throws MyException{
		if(this.userId==null){
			 throw new MyException(ApiCode.CODE_501, "请重新登录");
		}
		if(this.workId==null){
			 throw new MyException(ApiCode.CODE_501, "网络异常，请稍后重试");
		}
		if(this.ponId==null){
			 throw new MyException(ApiCode.CODE_501, "网络异常，请稍后重试");
		}
		if (StringUtils.isBlank(ronIdArr)) {
			throw new MyException(ApiCode.CODE_501, "网络异常，请稍后重试");
        }
	}

	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public Integer getWorkId() {
		return workId;
	}

	public void setWorkId(Integer workId) {
		this.workId = workId;
	}

	public Integer getPonId() {
		return ponId;
	}

	public void setPonId(Integer ponId) {
		this.ponId = ponId;
	}

	public String getRonIdArr() {
		return ronIdArr;
	}

	public void setRonIdArr(String ronIdArr) {
		this.ronIdArr = ronIdArr;
	}

}
